﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WorkStation.UI.Controls
{
    public class CircleMotion : MotionShape
    {
        public PointF CenterPoint;
        public double Radius;
        public CircleMotion()
        {

        }
        public CircleMotion(string description)
            : base(description)
        {

        }
        public override void Draw(Graphics g)
        {
            Pen circlepen = new Pen(PaintColor, LineWidth);
            int squarewidth = (int)(2 * Radius);
            g.DrawEllipse(circlepen, new Rectangle((int)(CenterPoint.X - squarewidth / 2),
                                                   (int)(CenterPoint.Y - squarewidth / 2),
                                                   squarewidth,
                                                   squarewidth));
            if (IsFill)
            {
                g.FillEllipse(new SolidBrush(Color.FromArgb(Alpha, FillColor)), new Rectangle((int)(CenterPoint.X - squarewidth / 2),
                                                   (int)(CenterPoint.Y - squarewidth / 2),
                                                   squarewidth,
                                                   squarewidth));
            }
        }
    }
}
